package com.ying.tests.AAAmode.strategy1.entity;

import java.util.Arrays;

/**
 * 业务线枚举类
 */
public enum BusinessLineEnum {

    BUSINESS_DEFAULT("DEFAULT"),
    BUSINESS_CSC("CSC"),
    BUSINESS_FIREMAN("FIREMAN"),
    BUSINESS_QM("QM"),
    BUSINESS_SAYABC("SAYABC");

    private String businessLine;

    public String getBusinessLine() {
        return businessLine;
    }

    public void setBusinessLine(String businessLine) {
        this.businessLine = businessLine;
    }

    BusinessLineEnum(String businessLine) {
        this.businessLine = businessLine;
    }

    public static BusinessLineEnum valueOf (String businessLine, BusinessLineEnum defaultLine) {
        BusinessLineEnum businessLineEnum = Arrays.stream(values())
                .filter(l -> l.businessLine.equalsIgnoreCase(businessLine))
                .findAny()
                .orElse(BusinessLineEnum.BUSINESS_DEFAULT);
        return businessLineEnum;
    }

}
